﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Banner.ascx.cs" Inherits="Sites_Vigor_Webparts_Common_Banner" %>
<%@ Import Namespace="NTTHAO.CommonWeb" %>
<%@ Import Namespace="NTTHAO.Web.BL.HighlightLink" %>
<div class="wrapper">
    <div class="slider">            
        <div class="slider-wrapper"><% 
HighlightLinkGroup hGroup = HighlightLinkGroup.GetItem(LanguageUtility.GetLanguageID() == 1 ? 1 : 2);
if (hGroup != null && hGroup.Links.Count > 0)
{
    string imagePath = "/" + NTTHAO.CommonWeb.Constant.UPLOAD_FILE_PATH + hGroup.ImagePath;
    int count = 0;
%>
            <div class="nivoSlider" id="slider"><%
    for (int i = 0; i < hGroup.Links.Count && (hGroup.MaxItemCount < 0 || count < hGroup.MaxItemCount); i++)
    {
        HighlightLink link = hGroup.Links[i];
        if (link.Activated) {
            count++;
%>
                <a href="<%=link.Href %>" target="<%=link.Target %>"><img alt="<%=Server.HtmlEncode(link.Title).Replace(Environment.NewLine, " ") %>" src="<%=imagePath + link.ImageName %>" /></a><%
    
        }
    }
%>
            </div>
<script type="text/javascript">
$(window).load(function() {
    $('#slider').nivoSlider({
        effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
        slices:10,
        animSpeed:600, //Slide transition speed
        pauseTime:5000,
        directionNav:false, //Next & Prev
        directionNavHide:false, //Only show on hover
        controlNav:true, //1,2,3...
        controlNavThumbs:false, //Use thumbnails for Control Nav
        controlNavThumbsFromRel:false, //Use image rel for thumbs
        keyboardNav:true, //Use left & right arrows
        pauseOnHover:true, //Stop animation while hovering
        manualAdvance:false//, //Force manual transitions
        //beforeChange: function(){},
        //afterChange: function(){},
        //slideshowEnd: function(){} //Triggers after all slides have been shown
    });
});
</script><%
} %>
        </div>
    </div>
    <div class="buttons-wrapper"><%
    if (_IsAuthenticated) { %>
        <a class="button" href="#" id="logout" onclick="return jwin.showLogout();">ĐĂNG XUẤT</a><%
    } else { %>
        <a class="button" href="#" id="register" onclick="return jwin.showLogin();">ĐĂNG NHẬP/ĐĂNG KÝ</a><%
    } %>
        <a class="button" href="#" onclick="return jwin.showBooking();">ĐẶT LỊCH KHÁM</a>
        <a class="button" href="report">BỆNH ÁN ĐIỆN TỬ</a>
    </div>
</div>